<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="df" uri="/WEB-INF/datetag.tld"%>
<!DOCTYPE html>
<html>
<head>

    <!-- start: Meta -->
    <meta charset="utf-8">
    <title>GM</title>
    <meta name="description" content="">
    <meta name="author" content="">
    <meta name="keyword" content="">
    <!-- end: Meta -->

    <!-- start: Mobile Specific -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- end: Mobile Specific -->

    <!-- start: CSS -->
    <link id="bootstrap-style" href="../css/bootstrap.min.css" rel="stylesheet">
    <link href="../css/bootstrap-responsive.min.css" rel="stylesheet">
    <link id="base-style" href="../css/style.css" rel="stylesheet">
    <link id="base-style-responsive" href="../css/style-responsive.css" rel="stylesheet">

    <!-- The HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <link id="ie-style" href="../css/ie.css" rel="stylesheet">
    <![endif]-->

    <!--[if IE 9]>
    <link id="ie9style" href="../css/ie9.css" rel="stylesheet">
    <![endif]-->

    <!-- start: Favicon -->
    <link rel="shortcut icon" href="../img/favicon.ico">
    <!-- end: Favicon -->

</head>

<body>
<!-- start: Content -->


<div class="row-fluid sortable">
    <div class="box span12">
        <div class="box-header" data-original-title>
            <h2>
                <i class="halflings-icon white user"></i>
                <span class="break"></span>
                菜单管理
            </h2>
            <a href="../right/gotoAddRight.web?parentNode=0">
                <i class="glyphicons-icon circle_plus" style="margin-top: -15px"></i>
            </a>
            <div class="box-icon">
                <a href="#" class="btn-setting">
                    <i class="halflings-icon white wrench"></i>
                </a>
                <a href="#" class="btn-minimize">
                    <i class="halflings-icon white chevron-up"></i>
                </a>
                <a href="#" class="btn-close">
                    <i class="halflings-icon white remove"></i>
                </a>
            </div>
        </div>

        <div class="box-content">
            <table class="table table-striped table-bordered bootstrap-datatable datatable">
                <thead>
                <tr>
                    <th>菜单名称</th>
                    <th>URL</th>
                    <th>状态</th>
                    <th>创建时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach items="${rightList}" var="right" >
                    <tr>
                        <td>${right.name}</td>
                        <td>${right.url}</td>
                        <td class="center">
                            <c:choose>
                                <c:when test="${right.status == 1}">
                                    <span class="label label-success">激活</span>
                                </c:when>
                                <c:otherwise>
                                    <span class="label label-warning">冻结</span>
                                </c:otherwise>
                            </c:choose>
                        </td>
                        <td class="center"><df:date value="${right.createTime}"/></td>

                        <td class="center">
                            <a class="btn btn-info" href="../right/gotoAddRight.web?parentNode=${right.id}">
                                <i class="halflings-icon plus-sign white"></i>
                            </a>
                            <a class="btn btn-info" href="../right/gotoUpdateRight.web?rightId=${right.id}">
                                <i class="halflings-icon white edit"></i>
                            </a>
                            <a class="btn btn-danger" href="javascript:if(confirm('确实要删除吗?'))location='right/deleteRight.web?rightId=${right.id}'">
                                <i class="halflings-icon white trash"></i>
                            </a>
                        </td>
                    </tr>
                    <c:forEach items="${right.sonRight}" var="sonRight">
                        <tr>
                            <td>------${sonRight.name}</td>
                            <td>${sonRight.url}</td>
                            <td class="center">
                            <td class="center">
                                <c:choose>
                                    <c:when test="${right.status == 1}">
                                        <span class="label label-success">激活</span>
                                    </c:when>
                                    <c:otherwise>
                                        <span class="label label-warning">冻结</span>
                                    </c:otherwise>
                                </c:choose>
                            </td>
                            </td>
                            <td class="center">
                                <df:date value="${sonRight.createTime}"/>
                            </td>

                            <td class="center">

                                <a class="btn btn-info" href="../right/gotoUpdateRight.web?rightId=${sonRight.id}">
                                    <i class="halflings-icon white edit"></i>
                                </a>
                                <a class="btn btn-danger" href="javascript:if(confirm('确实要删除吗?'))location='right/deleteRight.web?rightId=${sonRight.id}'">
                                    <i class="halflings-icon white trash"></i>
                                </a>
                            </td>
                        </tr>
                    </c:forEach>
                </c:forEach>
                </tbody>
            </table>
        </div>
    </div><!--/span-->

</div><!--/row-->
<!-- start: JavaScript-->

<script src="../js/jquery-1.9.1.min.js"></script>
<script src="../js/jquery-migrate-1.0.0.min.js"></script>

<script src="../js/jquery-ui-1.10.0.custom.min.js"></script>

<script src="../js/jquery.ui.touch-punch.js"></script>

<script src="../js/modernizr.js"></script>

<script src="../js/bootstrap.min.js"></script>

</body>
</html>
